package com.expdatacloud.service.impl;

import com.expdatacloud.annotation.AutoLog;
import com.expdatacloud.entity.log.HandleLogBean;
import com.expdatacloud.mapper.YtBinitrnMapper;
import com.expdatacloud.service.LogService;
import com.expdatacloud.service.YtBinitrnService;
import com.expdatacloud.vo.SumItrnVo;
import com.expdatacloud.vo.YtBinitrnVo;
import com.expdatacloud.vo.YtLinetupVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (YtBinitrnVo)表服务实现类
 *
 * @author makejava
 * @since 2020-05-22 15:12:18
 */
@Service("ytBinitrnService")
public class YtBinitrnServiceImpl implements YtBinitrnService {
    @Resource
    private YtBinitrnMapper ytBinitrnMapper;

    @Autowired
    private LogService logService;

    /**
     *  事务汇总查询
     * */
    @Override
    public List<SumItrnVo> itrnSummarizingList(YtBinitrnVo ytBinitrnVo){

//        ytBinitrnMapper.updateTest(ytBinitrnVo);
//        // 记录日志
//        logService.info(new HandleLogBean("测试","修改测试","updateTest","测试","storerkey:"+ytBinitrnVo.getStorerkey(),"测试修改成功"));

        return ytBinitrnMapper.itrnSummarizingList(ytBinitrnVo);

    }

    /**
     *  事务明细
     * */
    @Override
    public List<YtBinitrnVo> binitrnList(YtBinitrnVo ytBinitrnVo) {
        return ytBinitrnMapper.binitrnList(ytBinitrnVo);
    }

    /**
     *  获取逻辑仓
     * */
    @Override
    public List<YtLinetupVo> getWhcodeList(String storerkey) {
        return ytBinitrnMapper.getWhcodeList(storerkey);
    }

    /**
     *  获取库位和储位
     * */
    @Override
    public List<YtLinetupVo> getLocList(YtLinetupVo ytLinetupVo) {
        return ytBinitrnMapper.getLocList(ytLinetupVo);
    }

    @Override
    public List<YtLinetupVo> getItrn(List<String> data) {
        return ytBinitrnMapper.getItrn(data);
    }

}